$(document).ready(function(){
    $('a.scroll-top').click(function(){
        $('html, body').animate({scrollTop : 0},800);
		return false;
    });
    
    jQuery(function(){
      test()
        jQuery(window).resize(function(){test()})
        function test(){
            var windowWidth = jQuery(window).width();
            var windowHeight = jQuery(window).height();
            //console.log(windowHeight);
            var heightIntro = jQuery('.ctn-intro').height();
            //console.log(heightIntro);
            var mgTop = (windowHeight - heightIntro) / 2;
            jQuery('.ctn-intro').css('margin-top', mgTop);
            jQuery('.adv-intro').css('margin-top', mgTop);
        }
    });
});